package net.rezmason.wireworld.brains;

extern class BaseModel extends flash.events.EventDispatcher, implements net.rezmason.wireworld.IModel {
	function new() : Void;
	function baseGraphics() : flash.display.Graphics;
	function credit() : String;
	function eraseRect(rect : flash.geom.Rectangle) : Void;
	function generation() : Float;
	function getState(__x : Int, __y : Int) : UInt;
	function headData() : flash.display.BitmapData;
	function headGraphics() : flash.display.Graphics;
	function heatGraphics() : flash.display.Graphics;
	function height() : Int;
	function implementsOverdrive() : Bool;
	function init(txt : String, isMCell : Bool) : Void;
	function overdriveActive() : Bool;
	function refresh(flags : Int) : Void;
	function reset() : Void;
	function setBounds(top : Int, left : Int, bottom : Int, right : Int) : Void;
	function set_overdriveActive(value : Bool) : Void;
	function tailData() : flash.display.BitmapData;
	function tailGraphics() : flash.display.Graphics;
	function update() : Void;
	function width() : Int;
	function wireData() : flash.display.BitmapData;
	function wireGraphics() : flash.display.Graphics;
	private var _baseGraphics : flash.display.Graphics;
	private var _credit : String;
	private var _generation : UInt;
	private var _headData : flash.display.BitmapData;
	private var _headGraphics : flash.display.Graphics;
	private var _heatData : flash.display.BitmapData;
	private var _heatGraphics : flash.display.Graphics;
	private var _height : Int;
	private var _tailData : flash.display.BitmapData;
	private var _tailGraphics : flash.display.Graphics;
	private var _width : Int;
	private var _wireData : flash.display.BitmapData;
	private var _wireGraphics : flash.display.Graphics;
	private var activeCorner : flash.geom.Point;
	private var activeRect : flash.geom.Rectangle;
	private var bottomBound : Int;
	private var bound : flash.geom.Rectangle;
	private var importer : Importer;
	private var leftBound : Int;
	private var rightBound : Int;
	private var topBound : Int;
	private var totalNodes : Int;
	private function addNode(__x : Int, __y : Int, __state : Int) : Void;
	private function colorOf(input : Float) : UInt;
	private function drawBackground(graphicsObject : flash.display.Graphics, w : Float, h : Float, color : Int) : Void;
	private function drawData(graphicsObject : flash.display.Graphics, rect : flash.geom.Rectangle, data : flash.display.BitmapData) : Void;
	private function finishExtraction(event : flash.events.Event) : Void;
	private function finishParse(event : flash.events.Event) : Void;
	private function heatColorOf(input : Float) : UInt;
	private function refreshHeat(?fully : Int) : Void;
	private function refreshImage(?fully : Int, ?freshTails : Int) : Void;
}
